<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page
	import="tr.edu.ege.seagent.hobnobwebapp.HobNobServlet,
	tr.edu.ege.seagent.hobnobontology.instance.HobNobSPARQLQueries,
	tr.edu.ege.seagent.hobnobontology.instance.HobNobResultSetSolution,
	java.util.Iterator, java.util.List"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<form action="HobNobServlet" method="get">
		<table border="1">
			<%
				HobNobSPARQLQueries query = new HobNobSPARQLQueries();
				// Query is being executed for finding all notifications...
				List<HobNobResultSetSolution> resultSet = query
						.findAllNotificationsOverHttp();
				// Traverse this results...
				Iterator<HobNobResultSetSolution> iterator = resultSet.iterator();
				while (iterator.hasNext()) {
					HobNobResultSetSolution hobNobResultSetSolution = (HobNobResultSetSolution) iterator
							.next();
					// Getting notification's uri...
					String uri = hobNobResultSetSolution.getNotification()
							.asResource().getURI();
			%>
			
			<tr>
				<!-- <td><button id ="<%=uri%>" onclick="onClick()"><%=uri%></button></td>
				-->
				
				<td><a onclick="onClick()" id="notification" href="<%=uri%>"><%=uri%></a></td>
				
			</tr>			
			<%				
				}
			%>
		</table>
		<script type="text/javascript">
			function onClick(){
				document.write(document.getElementById("Selam"));
			}
		</script>
	</form>
</body>
</html>